{if $sql_queries}
<div style="text-align:center">
	<a href="#" id="queries-link">{lang values="installation|show_hide_executed_db_queries"}</a>
	<hr />
</div>
<table id="queries" class="hide">
	<thead>
		<tr>
			<th>{lang values="installation|sql_query"}</th>
			<th style="width:10%">{lang values="installation|result"}</th>
		</tr>
	</thead>
	<tbody>
{foreach from=$sql_queries item=row}
		<tr>
			<td style="text-align:left">{$row.query}</td>
			<td style="color:#fff;background:#{$row.color}">{$row.result}</td>
		</tr>
{/foreach}
	</tbody>
</table>
{if $install_error}
<p>
	{lang values="installation|installation_error"}
</p>
<div class="success forward">
	<a href="{uri args="overview/welcome"}" class="form">{lang values="common|back"}</a>
</div>
{else}
<p>
	{lang values="installation|installation_successful_1"}
</p>
<p>
	{lang values="installation|installation_successful_2"}
</p>
<div class="success forward">
	<a href="../../../../../" class="form">{lang values="common|forward"}</a>
</div>
{/if}
{else}
{$error_msg}
<form action="{uri args="install/configuration"}" method="post" accept-charset="UTF-8" id="tabs">
	<fieldset>
		<legend>{lang values="system|db_connection_settings"}</legend>
		<dl>
			<dt>
				<label for="db_host">{lang values="system|host"}</label>
				<span>{lang values="installation|hostname_description"}</span>
			</dt>
			<dd><input type="text" name="form[db_host]" id="db_host" value="{$form.db_host}" /></dd>
			<dt><label for="db_user">{lang values="system|db_username"}</label></dt>
			<dd><input type="text" name="form[db_user]" id="db_user" value="{$form.db_user}" /></dd>
			<dt><label for="db_pwd">{lang values="system|db_password"}</label></dt>
			<dd><input type="text" name="form[db_pwd]" id="db_pwd" value="{$form.db_pwd}" /></dd>
			<dt><label for="db_name">{lang values="system|db_name"}</label></dt>
			<dd><input type="text" name="form[db_name]" id="db_name" value="{$form.db_name}" /></dd>
			<dt><label for="db_pre">{lang values="system|table_prefix"}</label></dt>
			<dd><input type="text" name="form[db_pre]" id="db_pre" value="{$form.db_pre}" /></dd>
			<dt><label for="db_type">{lang values="system|db_type"}</label></dt>
			<dd>
				<select name="form[db_type]" id="db_type">
					<option value="">{lang values="common|pls_select"}</option>
{foreach from=$db_type item=row}
					<option value="{$row.value}"{$row.selected}>{$row.lang}</option>
{/foreach}
				</select>
			</dd>
		</dl>
	</fieldset>
	<fieldset>
		<legend>{lang values="installation|admin_account"}</legend>
		<dl>
			<dt><label for="user-name">{lang values="users|nickname"}</label></dt>
			<dd><input type="text" name="form[user_name]" id="user-name" value="{$form.user_name}" /></dd>
			<dt><label for="user-pwd">{lang values="users|pwd"}</label></dt>
			<dd><input type="password" name="form[user_pwd]" id="user-pwd" /></dd>
			<dt><label for="user-pwd-wdh">{lang values="users|pwd_repeat"}</label></dt>
			<dd><input type="password" name="form[user_pwd_wdh]" id="user-pwd-wdh" /></dd>
			<dt><label for="mail">{lang values="common|email"}</label></dt>
			<dd><input type="text" name="form[mail]" id="mail" value="{$form.mail}" /></dd>
		</dl>
	</fieldset>
	<fieldset>
		<legend>{lang values="system|general"}</legend>
		<dl>
			<dt><label for="title">{lang values="system|title"}</label></dt>
			<dd><input type="text" name="form[title]" id="title" value="{$form.title}" /></dd>
			<dt><label for="entries">{lang values="system|entries_per_page"}</label></dt>
			<dd>
				<select name="form[entries]" id="entries">
{foreach from=$entries item=row}
					<option value="{$row.value}"{$row.selected}>{$row.value}</option>
{/foreach}
				</select>
			</dd>
			<dt>
				<label for="flood">{lang values="system|flood_barrier"}</label>
				<span>({lang values="system|flood_barrier_description"})</span>
			</dt>
			<dd><input type="text" name="form[flood]" id="flood" value="{$form.flood}" maxlength="3" /></dd>
		</dl>
	</fieldset>
	<fieldset>
		<legend>{lang values="common|date"}</legend>
		<dl>
			<dt>
				<label for="date">{lang values="system|date_format"}</label>
				<span>({lang values="system|php_date_function"})</span>
			</dt>
			<dd><input type="text" name="form[date]" id="date" value="{$form.date}" maxlength="20" /></dd>
			<dt><label for="time_zone">{lang values="common|time_zone"}</label></dt>
			<dd>
				<select name="form[time_zone]" id="time_zone">
{foreach from=$time_zone item=row}
					<option value="{$row.value}"{$row.selected}>{$row.lang}</option>
{/foreach}
				</select>
			</dd>
			<dt><label for="dst_yes">{lang values="common|daylight_saving_time"}</label></dt>
			<dd>
				<label for="dst_yes">
					<input type="radio" name="form[dst]" id="dst_yes" value="1"{$dst.0.checked} class="checkbox" />
					{lang values="common|yes"}
				</label>
				<label for="dst_no">
					<input type="radio" name="form[dst]" id="dst_no" value="0"{$dst.1.checked} class="checkbox" />
					{lang values="common|no"}
				</label>
			</dd>
		</dl>
	</fieldset>
	<div style="margin-top:20px">
		<input type="submit" name="submit" value="{lang values="common|submit"}" class="form" />
		<input type="reset" value="{lang values="common|reset"}" class="form" />
	</div>
</form>
{/if}